require.config({
  paths:{
    'backbone':'./libs/backbone',
    'underscore':'./libs/underscore',
    'jquery':'./libs/jquery',
    'text':'./libs/text',
    'css':'./libs/css',
    'homejs':'./libs/home',
    'touch':'./libs/touch',
    'sscsjs':'./libs/sscs'
  }
});

require(['backbone'],function(backbone){
  var Router=backbone.Router.extend({
      routes:{
        '':'home',
        'home':'home',
        'mine':'mine',
        'shoppingCar':'shoppingCar',
        'sscs':'sscs'
      },
      home:function(){
        require(['jquery','touch','text!./home/home.html','homejs','css!./home/home.css'],function($,touch,html,homejs){
          $('.content').html(html);
         homejs.sum();
        })
      },
      mine:function(){
        require(['jquery','text!./mine/mine.html','css!./mine/mine.css'],function($,html){
          $('.content').html(html);


        })
      },
      shoppingCar:function(){
        require(['jquery','text!./shoppingCar/shoppingCar.html','css!./shoppingCar/shoppingCar.css'],function($,html){
          $('.content').html(html);
        })
      },
      sscs:function(){
        require(['jquery','text!./sscs/sscs.html','sscsjs','css!./sscs/sscs.css'],function($,html,sscsjs){
          $('.content').html(html);
          sscsjs.csjs();
        })
      }
  });

  var router =new Router();
  backbone.history.start();



})
